package com.bjpowernode.crm.workbench.service.impl;

import com.bjpowernode.crm.workbench.domain.Customer;
import com.bjpowernode.crm.workbench.mapper.CustomerMapper;
import com.bjpowernode.crm.workbench.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName : CustomerServiceImpl
 * @Author : 司猫子
 * @Date: 2021/1/13 15:05
 */
@Service
public class CustomerServiceImpl implements CustomerService {
    @Autowired
    private CustomerMapper customerMapper;
    public int deleteByPrimaryKey(String id) {
        return customerMapper.deleteByPrimaryKey(id);
    }

    public int insert(Customer record) {
        return customerMapper.insert(record);
    }

    public int insertSelective(Customer record) {
        return customerMapper.insertSelective(record);
    }

    public Customer selectByPrimaryKey(String id) {
        return customerMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Customer record) {
        return customerMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(Customer record) {
        return customerMapper.updateByPrimaryKey(record);
    }

    public int insertCustomer(Customer customer) {
        return customerMapper.insertCustomer(customer);
    }

    public List<Customer> selectCustomerByName(String name) {
        return customerMapper.selectCustomerByName(name);
    }
}
